﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DoAn.DTO;
using System.Windows.Forms;
using System.Data;


namespace DoAn.DAO
{
    public class QuaTrinhDauGiaDAO
    {
        public static void insert_ragia(QuaTrinhDauGiaDTO qt)
        {
            //MessageBox.Show(qt.MaSan.ToString());
            string sql = "insert QUATRINHDAUGIA(MaSan,TenTaiKhoan,SoTien,NgayGio) values(" + qt.MaSan.ToString() + ",'" + qt.TenTaiKhoan + "'," + qt.SoTien.ToString() + ",'" + DateTime.Now.ToString() + "')";
            DataProvider.ExcuteQuery(sql);
        }
        public static DataTable laydstheoma(int ma)
        { 
            string sql= "select * from QUATRINHDAUGIA Where MaSan='"+ma.ToString()+"' order by sotien DESC";
            return DataProvider.DataTable(sql);
        }
    }
}